package com.starhub.engine.directory.result;

import com.starhub.engine.directory.entity.DirectoryInfo;
import lombok.Data;

@Data
public class DirectoryDealResult {
    private boolean success;
    private String message;
    private String id;
    private DirectoryInfo data;
    
    public static DirectoryDealResult success(String id) {
        DirectoryDealResult result = new DirectoryDealResult();
        result.setSuccess(true);
        result.setId(id);
        return result;
    }           

    public static DirectoryDealResult success(String id, DirectoryInfo data) {
        DirectoryDealResult result = new DirectoryDealResult();
        result.setSuccess(true);
        result.setId(id);
        result.setData(data);
        return result;
    }

    public static DirectoryDealResult fail(String message) {
        DirectoryDealResult result = new DirectoryDealResult();
        result.setSuccess(false);
        result.setMessage(message);
        return result;
    }

}
